import 'package:flutter/material.dart';

class MyButton extends StatelessWidget {
  const MyButton(
      {super.key,
      required this.boxDecoration,
      required this.child,
      required this.size,
      this.onClick,
      this.margin = EdgeInsets.zero});

  final BoxDecoration boxDecoration;
  final Widget child;
  final void Function()? onClick;
  final List<double> size;
  final EdgeInsetsGeometry margin;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onClick,
      child: Container(
        margin: margin,
        alignment: Alignment.center,
        width: size[0],
        height: size[1],
        decoration: boxDecoration,
        child: child,
      ),
    );
  }
}
